interface RectAngle {
  width: number;
  height: number;
  [propName: string]: any;
}

let square: RectAngle = {
  width: 100,
  height: 80
}

let square2: RectAngle = {
  width: 80,
  height: 80,
  type: 'angle',
  color: 'red'
}

function getArea(shape: RectAngle): number {
  return shape.width * shape.height;
}

console.log(getArea(square));
console.log(getArea(square2));
